//
//  ZYLAuthorTableViewCell.m
//  Cartoon
//
//  Created by dllo on 15/7/15.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "ZYLAuthorTableViewCell.h"
#import "Define.h"
@implementation ZYLAuthorTableViewCell
- (void)dealloc
{
    [_topicImageView release];
    [_topicIntro release];
    [_topicTitle release];
    [super dealloc];
    
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.topicImageView = [[[UIImageView alloc] init] autorelease];
        self.topicIntro = [[[UILabel alloc] init] autorelease];
        self.topicTitle = [[[UILabel alloc] init] autorelease];
        [self.contentView addSubview:self.topicImageView];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.topicImageView.frame = CGRectMake(5, 5, SCREEN_WIDTH - 10, self.contentView.frame.size.height - 10);
    self.topicImageView.backgroundColor = [UIColor greenColor];
    self.topicTitle.frame = CGRectMake(0, 0, self.topicImageView.frame.size.width, 40);
    self.topicTitle.backgroundColor = [UIColor blackColor];
    self.topicTitle.alpha = 0.4;
    self.topicTitle.textColor = [UIColor whiteColor];
    self.topicTitle.font = [UIFont systemFontOfSize:20];
    [self.topicImageView addSubview:self.topicTitle];
    
    self.topicIntro.frame = CGRectMake(0, self.topicImageView.frame.size.height - 45, self.topicImageView.frame.size.width, 45);
    self.topicIntro.backgroundColor = [UIColor blackColor];
    self.topicIntro.alpha = 0.4;
    self.topicIntro.numberOfLines = 0;
    self.topicIntro.textColor = [UIColor whiteColor];
    self.topicIntro.font = [UIFont systemFontOfSize:13];
    [self.topicImageView addSubview:self.topicIntro];
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
